package com.farm.cropper.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.farm.cropper.mapper.CropperMapper;
import com.farm.cropper.domain.Cropper;
import com.farm.cropper.service.ICropperService;

/**
 * 农作物管理Service业务层处理
 * 
 * @author yd
 * @date 2024-03-17
 */
@Service
public class CropperServiceImpl implements ICropperService 
{
    @Autowired
    private CropperMapper cropperMapper;

    /**
     * 查询农作物管理
     * 
     * @param cropperId 农作物管理主键
     * @return 农作物管理
     */
    @Override
    public Cropper selectCropperByCropperId(Long cropperId)
    {
        return cropperMapper.selectCropperByCropperId(cropperId);
    }

    /**
     * 查询农作物管理列表
     * 
     * @param cropper 农作物管理
     * @return 农作物管理
     */
    @Override
    public List<Cropper> selectCropperList(Cropper cropper)
    {
        return cropperMapper.selectCropperList(cropper);
    }

    /**
     * 新增农作物管理
     * 
     * @param cropper 农作物管理
     * @return 结果
     */
    @Override
    public int insertCropper(Cropper cropper)
    {
        return cropperMapper.insertCropper(cropper);
    }

    /**
     * 修改农作物管理
     * 
     * @param cropper 农作物管理
     * @return 结果
     */
    @Override
    public int updateCropper(Cropper cropper)
    {
        return cropperMapper.updateCropper(cropper);
    }

    /**
     * 批量删除农作物管理
     * 
     * @param cropperIds 需要删除的农作物管理主键
     * @return 结果
     */
    @Override
    public int deleteCropperByCropperIds(Long[] cropperIds)
    {
        return cropperMapper.deleteCropperByCropperIds(cropperIds);
    }

    /**
     * 删除农作物管理信息
     * 
     * @param cropperId 农作物管理主键
     * @return 结果
     */
    @Override
    public int deleteCropperByCropperId(Long cropperId)
    {
        return cropperMapper.deleteCropperByCropperId(cropperId);
    }
}
